USPS Intelligent Mail Barcodes

FormFusion 3.3 supports the Intelligent Mail barcode specification used by the United States Postal Service. It is also known as the USPS OneCode Solution or USPS 4-State Customer barcode (4CB, 4-CB, or USPS4CB).

USPS provides mailing discounts to customers who use barcodes to identify large volumes of outgoing mail. FormFusion can take a numeric string as input and generate the corresponding Intelligent Mail barcode, which can then be placed on the FormStamp to print on envelopes or on the mailer portion of a form.

Envelope showing barcode above address

The barcode contains a 20 to 31-digit number containing information identifying the sender, the mail class, and the destination ZIP code:



Field
Digits
More Information
Tracking code
Barcode Identifier 2 Presort identification number – describes whether or not the mail has already been sorted to some extent
Chart of USPS Barcode Identifiers

Service Type Identifier 3 Type of mail service (e.g. first class, standard, priority, etc.)
Chart of USPS Service Type Identifiers

Mailer Identifier 6 or 9 Unique number identifying the USPS customer (the sender)
Assigned by USPS

Serial number 9 or 6 Sender’s serial or sequence number to track each piece of mail
If the Mailer Identifier is 6 digits, the serial number can use 9.
If the Mailer Identifier is 9 digits, the serial number can use 6.

Routing Code
Delivery point ZIP code 0, 5, 9, or 11 Recipient's ZIP code

Total   20-31 depending
on routing code
 


This table is a general overview of the barcode format. For exact specifications and any updates or changes, please refer to the USPS publications available at https://ribbs.usps.gov/index.cfm

 

There are three setup steps required to produce Intelligent Mail barcodes in FormFusion:

  1. Install the barcode font
  2. Map or create the numeric string to be encoded, based on data in the input file
  3. Add the variable containing the string to the FormStamp, and encode it as an Intelligent Mail barcode

Installing the Barcode Font

The Intelligent Mail barcode font can be downloaded from the USPS website linked above, or from the Documentation and Software page of the Evisions website.

As with any other font, it must be added to both the template developer’s machine and the MAP server. The list of fonts visible in the dropdowns in FormFusion is populated from the client machine, but the fonts used at run time are those on the server (since the MAP server does the actual job processing).

In order to print hard copy output, the MAP server must be rebooted before any newly installed fonts can be used. PDF output should render correctly without a reboot. Note that it is the actual machine that must be restarted, not just the MAPS service.

Storing the Numeric String into a FormFusion Variable

Depending on the input file, it may be possible to read in some or all of the string from the input file using MapForm variables. Alternatively, use a CaptureForm query to build the input string, incorporating information from MapForm as needed.

The following example builds a CaptureForm query that hard codes most of the USPS options, and uses the recipient’s ZIP code from the input file.

  1. In MapForm, use a floating or offset field to map the ZIP code from the input file.
    Mapping the ZIP code

  2. Create a new string SQL variable in Variable Storage.
    Creating a CaptureForm variable to hold the barcode

  3. Create a CaptureForm query that builds the numeric string. Use the :ZIP variable at the end of the string for the Routing Code.
    select '00123123456123456789" || :ZIP into :Barcode from dual

Notice how the rest of the string has been entered as static text. If another part of the string (for example, the serial number) will use variable input, edit the query to use the additional variables.

Adding the Barcode to FormStamp

  1. Add the :Barcode variable to the FormStamp using a data field. Place it where the barcode should appear on the form.
    Adding the :Barcode variable to the FormStamp

  2. Double click the data field to edit its properties. On the Barcode tab, select “USPS Intelligent Mail” in the encoding drop down.
    Selecting the encoding dropdown

  3. On the Font tab, choose the “USPSIMBStandard” font.
    Selecting the data field font

    Click OK to exit out of the dialog. Then, save the template.

  4. If preview mode is turned on, the barcode displays as string data on the FormStamp. To see how the barcode actually looks, do a test print template.
    The barcode showing above the address on the template

Troubleshooting

Nothing is printing where the barcode should appear

If the barcode encoder receives invalid input, it will not print. This feature helps to prevent mail from being sent out with invalid barcodes.

The barcode is printing as a string of letters instead of as a barcode

This indicates that the numeric string has been encoded, but the system is unable to use the barcode font that turns the character string into an actual barcode. Check to make sure that:

The barcode is the wrong size/in the wrong location

Refer to the USPS publications available at https://ribbs.usps.gov/index.cfm for information on the size, location, and surrounding padding required for Intelligent Mail barcodes.

Recipients of PDF files are unable to view the barcodes

By default, PDF files do not include custom fonts in the file. If such a PDF file uses a font that the viewer does not have installed, it chooses a substitute font. To make sure that barcodes display correctly in PDF output, turn on font embedding in the PDF options of the FormDirector.